<?php
include 'database.class.php';
$db = new Database();
$db->dbConnect();
$rst_est = mysql_query("SELECT codigo, nombre, apellido, semestre,
    direccion, telefonocelular, telefonofijo, identificacion, correo
FROM
    estudiante ORDER BY apellido");
$num_reg = mysql_num_rows($rst_est);
if ($num_reg == 0) {
    echo("No se encontraron resultados");
	
	$convertir="</br>Regresar al inicio <a href=index.php><img src='images/logo-08-icon.png' width='48' height='48'></a>";
	echo($convertir);
    mysql_close();
    exit();
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="css/default.css" rel="stylesheet" type="text/css" media="screen"/>
        
          <script src="js/jquery-1.4.3.js" type="text/javascript"></script>
        <script src="js/jquery.slidefade.js" type="text/javascript"></script>
         <script src="js/shortcuts.js" type="text/javascript"></script>

        <style type="text/css">
            #commentForm { width: 500px; }
            #commentForm label { width: 250px; }
            #commentForm label.error, #commentForm input.submit { margin-left: 253px; }
        </style>

        <title>Estudiantes Registrados</title>

    </head>
    <!--body-->
    <body>
<div id="content">
      <P style="font-size: 20pt; color: oldlace; font: italic 36px Arial, Helvetica, sans-serif;">Estudiantes</P>

        <table class="aatable">
            

               
                        <tr>
                            <th><center>Codigo</center></th>
                            <th><center>Nombres</center></th>
                            <th><center>Apellidos</center></th>
                            <th><center>Direccion</center></th>
                            <th><center>Semestre</center></th>
                            <th><center>Tel Movil</center></th>
                            <th><center>Tel Fijo</center></th>
                            <th><center>Documento</center></th>
                            <th><center>E-mail</center></th>
                             <th><center>Editar Info</center></th>

                        </tr>

<?php
while ($fila = mysql_fetch_array($rst_est)) {
?>
                        <tr>

                            <td><strong><?php echo$fila["codigo"]; ?></strong></td>
                            <td><?php echo$fila["nombre"]; ?></td>
                            <td><strong><?php echo$fila["apellido"]; ?></strong></td>
                            <td><?php echo$fila["direccion"]; ?></td>
                            <td><?php echo$fila["semestre"]; ?></td>
                            <td><?php echo$fila["telefonocelular"]; ?></td>
                            <td><?php echo$fila["telefonofijo"]; ?></td>
                            <td><?php echo$fila["identificacion"]; ?></td>
                            <td><?php echo$fila["correo"]; ?></td>
                            <td><a href="editar.php?codigo='<?php echo$fila["codigo"]; ?> '" ><img src="images/edit-03.png" width="20" height="20"></a></td>
                        </tr>
<?php
                    }
?>

        

       </table>

       <br/>
	<div style="clear:both"></div>
    <br/>
    <div class="controls">
           <input type="button" value="Ocultar/Mostrar Lista" id="toggle" />
    </div>
     <br/>
   
<div class="links"><a href="index.php"><img src="images/logo-08-icon.png" width="48" height="48"></a></div>
   </div>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <!-- end div#wrapper -->
</body>
<!--body ends-->
</html>
